package com.cadre.system.domain.vo;

import com.cadre.system.domain.officer.A01;
import com.fasterxml.jackson.databind.ObjectMapper;

import java.util.HashMap;
import java.util.Map;

/* loaded from: ESUtil.class */
public class ESUtil {
    public static String a01Index = "a01_list";

    public static A01 useObjectMapper(Map<String, Object> map) {
        // 创建一个新的Map，用于存储键为小写的键值对
        Map<String, Object> lowerCaseMap = new HashMap<>();

        // 遍历原始Map，将每个键转换为小写
        for (Map.Entry<String, Object> entry : map.entrySet()) {
            lowerCaseMap.put(entry.getKey().toLowerCase(), entry.getValue());
        }

        // 使用新的Map进行对象转换
        return (A01) new ObjectMapper().convertValue(lowerCaseMap, A01.class);
    }
}
